package com.weixing.mall.base.enums;

/**
 * 返回值枚举
 *
 * @author  siashan
 * @since v1.0
 */
public enum ResultCodeEnum {


    SUCCESS(200,"请求成功"),
    ERROR(400,"请求失败"),
    UNAUTHORIZED(401,"用户未登陆"),
    AUTHORIZED_FAIL(401,"用户名不存在或者密码错误"),
    ACCESS_DENIED(403,"无访问权限"),
    NOT_FOUND(404,"请求资源不存在"),
    EXCEPTION(500,"服务器内部异常"),
    GATEWAY_TIMEOUT(504,"服务暂时不可用"),

    // 认证相关 10011***
    CODE_10011001(10011001,"token已失效"),
    CODE_10011002(10011002,"token为空"),
    CODE_10011003(10011003,"未携带设备唯一标识码"),
    CODE_10011004(10011004,"验证码为空"),
    CODE_10011005(10011005,"验证码校验失败"),
    CODE_10011007(10011007,"验证码已过期"),
    CODE_10011006(10011006,"请勿重复提交"),

    // 用户相关 10012***
    CODE_10012001(10012001,"用户名已存在"),
    CODE_10012002(10012002,"权限不足，请联系管理员！"),
    CODE_10012003(10012003,"已安全退出"),
    CODE_10012004(10012004,"手机号已被注册"),
    CODE_10012005(10012005,"原密码输入错误"),
    CODE_10012006(10012006,"发送短信频率过高，请一个小时后重试"),
    CODE_10012007(10012007,"该手机号未注册"),
    CODE_10012008(10012008,"两次密码输入不一致"),





    // 公共模块
    CODE_10013001(10013001,"图片上传失败"),

    // sys模块
    CODE_10014001(10014001,"该角色关联的有用户，是否要继续删除"),
    // 代理商相关 10015***
    CODE_10015001(10015001,"您的代理权益时间还剩{}天，请尽快联系您的专属客服进行续费！"),
    CODE_10015002(10015002,"代理商{}到期时间还剩{}天，请尽快跟进！"),
    CODE_10015003(10015003,"代理商不存在！"),
    CODE_10015010(10015002,"请检查手机号、微信号和代理商编号重复"),
    CODE_END(99999999,"无实际意义，请不要使用");




    private int code;
    private String msg;

    ResultCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
